﻿<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../base.jsp"%> 
<sys:genericTag4o id="menusByUser" methodName="queryMenusByUser" className="com.tmpt.controller.taglib.SecurityV2Tag"/>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>windows桌面</title>
    <link rel="stylesheet" type="text/css" media="screen" href="css/app.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="css/icon.css" />
    
	<link rel="stylesheet" type="text/css" href="${path}/js/jquery/easyui1.5/themes/bootstrap/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="${path}/js/jquery/easyui1.5/themes/icon.css"/>
	<script type="text/javascript" src="${path}/js/jquery-1.8.0.min.js"></script>
	<script src="${path}/js/jquery/easyui1.5/jquery.easyui.min.js"></script>

    <link type="text/css" href="${path}/js/toastmessage/css/jquery.toastmessage.css" rel="stylesheet"/>
    <script type="text/javascript" src="${path}/js/toastmessage/jquery.toastmessage.js"></script>

    <script type="text/javascript" src="js/jquery.app.js?random=<%=Math.random()%>" charset="utf-8"></script>
    <script type="text/javascript" src="js/initApp.js?random=<%=Math.random()%>" charset="utf-8"></script>
    <script type="text/javascript" src="js/startMenu.js?random=<%=Math.random()%>" charset="utf-8"></script>
    <script type="text/javascript">
    
    
		var menusByUserStr = '${menusByUser}';
		var menusByUser = $.parseJSON(menusByUserStr);
		
		function goMenuMode(){
			window.location.href='${path}/admin123/index1.jsp';
		}
		function goOut(){
			window.location.href='${path}/j_spring_security_logout';
		}
		
    	function refreshapp(){
    		$('body').app("refreshapp",'json/app.jsp');
    	}
		
    	function createwindow(opt){
			$('body').app("createwindow",opt);
    	}
		
		function _start_menu_tree_div_show(){
			//$("#startMenuCss").attr({href: "css/startmenu.css"});
			//$('#_start_menu_tree_div').show();
    		//$("#_start_menu_tree_div").animate({height:'toggle'},500);
    		$("#_start_menu_tree_div").animate({height:'show'},300);
		}
		
		function _start_menu_tree_div_hide(){
			//hide开始菜单，写在jquery.app.js加载好直接hide不行，不知道为什么
			//$('#_start_menu_tree_div').hide();
			//$("#startMenuCss").attr({href: "css/startmenu1.css"});
    		$("#_start_menu_tree_div").animate({height:'hide'},100);
		}

    	function showSuccessToast(type,msg){
			$().toastmessage(type, msg);
    	}
    	
    	//显示日历控件
    	function togglePlugin(pluginId){
    		$("div[plugin="+pluginId+"]").toggle(300);
    		$("div[plugin="+pluginId+"]").animate({ right: '+20px' }, "slow");
    	}
    	function hidePlugin(pluginId){
    		$("div[plugin="+pluginId+"]").hide(300);
    	}
    	
    	//全屏
    	function fullScreen(){
    		fullScreenCore(document.documentElement);
    	}
    	function fullScreenCore(docElm){
			//W3C  
			if (docElm.requestFullscreen) {  
			    docElm.requestFullscreen();  
			}
			//FireFox  
			else if (docElm.mozRequestFullScreen) {  
			    docElm.mozRequestFullScreen();  
			}
			//Chrome等  
			else if (docElm.webkitRequestFullScreen) {  
			    docElm.webkitRequestFullScreen();  
			}
			//IE11
			else if (docElm.msRequestFullscreen) {
			  docElm.msRequestFullscreen();
			}
    	}
    	
    	//退出全屏
    	function cancelFullScreen(){
	    	if (document.exitFullscreen) {  
			    document.exitFullscreen();  
			}  
			else if (document.mozCancelFullScreen) {  
			    document.mozCancelFullScreen();  
			}  
			else if (document.webkitCancelFullScreen) {  
			    document.webkitCancelFullScreen();  
			}
			else if (document.msExitFullscreen) {
			      document.msExitFullscreen();
			}
		}
    	
		function Open(text,url){
			url = '${path}'+'/'+url;
			var option = {
				'text':text,
				'href':url,
				'iframe':true
			}; 
			$('body').app("createwindow",option);
		}
		
        $(function () {
            
            if(menusByUserStr==''){
           		goOut();
            }
           
            if ($.browser.msie && parseInt($.browser.version) < 8) {
                $.messager.alert("温馨提示", "您当前正在使用的是IE" + $.browser.version + "。该程序支持<a style='color:green' target='_blank' href='http://windows.microsoft.com/zh-CN/internet-explorer/products/ie/home'>IE8.0</a>以上版本及谷歌，火狐..");
            }
            try {
                top.location.hostname;
                if (top.location.hostname != window.location.hostname) {
                    top.location.href = window.location.href;
                }
            }
            catch (e) {
                top.location.href = window.location.href;
            }
        });
        
        function onclick_body(){
        	fullScreen();
        }
    </script>
</head>
<body onclick="onclick_body()">

	
	<!-- 开始菜单 -->	
	<div  id="_start_menu_tree_div" style=" z-index: 99999;position: absolute;background-color:#666666; display: block;">
		<iframe src="start_menu.jsp" height="600px" width="325px" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes">
		</iframe>
	</div>
	
	<div id="win_menu2"/> 
</body>
</html>
